using System.Xml;

namespace ICommonLibrary.Xml {

    public static class XmlReaderExtention {

        public static string TryReadElementContentAsString(this XmlReader reader, string elementName) {
            if (reader.LocalName.Equals(elementName)) {
                return Util.GetTrimString(reader.ReadElementContentAsString());
            }
            return null;
        }
        
    }
}